package com.xinling.modules.blog.mapper;

import com.xinling.modules.blog.model.entity.BlogTag;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface BlogTagMapper {
    
    BlogTag findById(@Param("id") Integer id);
    
    List<BlogTag> findAll();
    
    List<BlogTag> findByPostId(@Param("postId") Integer postId);
    
    int insert(BlogTag tag);
    
    int update(BlogTag tag);
    
    int delete(@Param("id") Integer id);
    
    int insertPostTag(@Param("postId") Integer postId, @Param("tagId") Integer tagId);
    
    int deletePostTag(@Param("postId") Integer postId, @Param("tagId") Integer tagId);
    
    int deletePostTags(@Param("postId") Integer postId);
} 